﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  
</head>

<body class="ms-theme-blue">

  <%@ include file="/WEB-INF/include/header.jsp"%>
  <%@ include file="/WEB-INF/include/submenu.jsp"%>

  <div class="container-fluid umu-container has-umu-sidemenu">
    <div class="umu-breadcrumb">
      <div class="breadcrumb">标准课程管理</div>
    </div>
    

    <div class="panel-default beast-panel beast-panel-layout">

      <div class="panel-body">

        <div class="col-xs-12 beast-panel-layout-right">

    		<div class="ms-content-layout">
		      <div class="ms-operation-bar no-margin no-bottom-border clearfix">
		        <div class="ms-operation-group pull-right">
					<a href="${ctx.host}/courses/search" data-toggle="modal" data-target="#search" class="btn btn-shadow-success btn-shadow umu-btn">
					  <i class="glyphicon glyphicon-search"></i>&nbsp;&nbsp;过滤查询
					</a>
					<a href="${ctx.host}/courses/create" class="btn btn-shadow-success btn-shadow umu-btn" data-target="#create" data-toggle="modal"> 
					  <i class="glyphicon glyphicon-plus"></i>&nbsp;&nbsp;新增课程
					</a>
		        </div>
		      </div> <br />
		    
		      <table class="table table-hover umu-table tab-pane table-striped">
		        <thead>
		          <tr>
		            <th>课程编号</th>
					<th>课程名称</th>
					<th>课程时长</th>
					<th>课程目标</th>
					<th>课程介绍</th>
					<th>讲授次数</th>
					<th>课程类型</th>
					<th class="text-center">操作</th>
		          </tr>
		        </thead>
		        
		        <tbody>
		        	<c:forEach items="${course}" var="course">
		        		<tr>
		        			<td>${course.code}</td>
		        			<td>${course.name}</td>
		        			<td>${course.hour}</td>
		        			<td>${course.target}</td>
		        			<td>${course.description}</td>
		        			<td>${course.courseTime}</td>
		        			<td>${course.type}</td>
		        			<td class="text-center">
		        			<a href="${ctx.host}/courses/${course.id}/edit" data-target="#edit" data-toggle="modal">修改</a>&nbsp;&nbsp; 
									<a href="${ctx.host}/courses/${course.id}/delete" data-target="#delete" data-toggle="modal">删除</a>&nbsp;&nbsp; 
									<a href="${ctx.host}/courses/${course.id}">详情</a>
		        			</td>
		        		</tr> 	
		        	</c:forEach>
		        	
				<!--	<tr>
					<td>1</td>
					<td>课程1</td>
					<td>1</td>
					<td>目标1</td>
					<td>课程介绍1</td>
					<td>1</td>
					<td>-->
					<!--<a href="${ctx.host}/courses/1">详情</a>&nbsp;&nbsp; -->
					<!--<a href="${ctx.host}/courses/1/edit" data-target="#edit" data-toggle="modal">修改</a>&nbsp;&nbsp;
					<a href="${ctx.host}/courses/1/delete" data-target="#delete" data-toggle="">删除</a>&nbsp;&nbsp;</td>
					</tr>		        
					<tr>
					<td>2</td> 
					<td>课程2</td>
					<td>2</td>
					<td>目标2</td>
					<td>课程介绍2</td>
					<td>2</td>
					<td>-->
					<!--<a href="${ctx.host}/courses/2">详情</a>&nbsp;&nbsp;-->
					<!--<a href="${ctx.host}/courses/1/edit" data-target="#edit" data-toggle="modal">修改</a>&nbsp;&nbsp; 
					<a href="${ctx.host}/courses/2/delete" data-target="#delete" data-toggle="">删除</a>&nbsp;&nbsp;</td>
					</tr>		 -->       
		        </tbody>
		       		<tfoot>
								<tr>
									<td colspan="9" class="no-vertical-padding"> 
										<div class="pull-left">
											<jsp:include page="/WEB-INF/include/page.jsp">
												<jsp:param name="url" value="${ctx.host}/courses"/>
												<jsp:param name="queryString" value="${queryString}"/> 
											</jsp:include>
										</div>
									</td>
								</tr>
								
							</tfoot>	        
		
		      </table>
		    </div>           
        </div>

      </div>

    </div>

  </div>

  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource type="script" root="${ctx.resource}/build"
		src="js/page/course/course-list.js" />
	<script type="text/javascript">
		require([ 'page/course/course-list' ], function(page) {
			page.init()
		})
	</script>

</body>
</html>